<template>
  <div class="main">
    <div class="headcard">
      <div class="uc-header">
        <div class="back" @click="$router.back()">
          <img src="@/assets/img/3.png" />
        </div>
        <div class="title">{{ $t("Withdrawal") }}</div>
        <div class="head-tips" @click="$router.push('/withdrawalHistory')">
          <img src="@/assets/img/18.png" />
        </div>
      </div>
      <!-- <div class="tips-box" v-show="tipshow">
        <div class="text">{{ this.withdrawalTips }}</div>
        <div class="btn" @click="keripik">Keripik</div>
      </div> -->
      <div :class="['hbox', { tipshow: !tipshow }]">
        <div class="hbox-head">
          <div class="hbox-head-left">{{ $t("EnterAmount") }}</div>
          <div class="hbox-head-right" @click="rulesShow = true">?</div>
        </div>
        <!-- <div class="hbox-fee-tips" v-if="value != 0">
          Service fee&nbsp;(usd):&nbsp;{{
            Number(value) - Number(calculateAmount().amount)
          }}
        </div> -->
        <div class="inputbox">
          <!-- <div class="input" @click="keyShow = true">{{ value }}</div> -->
          <input class="input" type="number" v-model="value" @input="update" />
          <div class="input-txt"></div>
          <div class="input-currency">USD</div>
          <div class="input-btn" @click="query">提款</div>
          <!-- <div class="input-icon">
            <img src="@/assets/img/diamondd.png" alt="" />
          </div> -->
        </div>
        <!-- <div>The minimum withdrawal limnit is {{minimum}} usd</div> -->
        <!-- <div class="hbox-tips-error" v-if="value != 0 && value < minimum">
          The minimun withdrawal limit is {{ minimum }} usd
        </div> -->
        <div class="hbox-tips">
          {{ $t("WithdrawalLimit") }}:
          <span :style="!isWithdrawa ? 'color:red' : ''"
            >{{ formatMoney(assets_available, true) }} {{ $t("USD") }}</span
          >
        </div>
      </div>
    </div>
    <!-- <InputNumber
      ref="InputNumber"
      @update="update"
      @query="query"
      :btntext="$t('Withdrawal')"
      v-show="keyShow"
    /> -->
    <!-- Withdrawal rules -->
    <van-popup v-model="rulesShow" round position="bottom" closeable>
      <div class="uapopup">
        <div class="head">{{ $t("WithdrawalRules") }}</div>
        <div class="rulebox">
          {{ $t("WithdrawalRulesTips") }}
        </div>
      </div>
    </van-popup>
    <!-- <van-popup v-model="keripikShow" round position="bottom" closeable>
      <div class="uapopup">
        
        <div class="rulebox">
          {{ exchangeTips }}
        </div>
      </div>
    </van-popup> -->

    <!-- Withdrawal submit  -->
    <van-popup v-model="wqueryShow" round position="bottom" closeable>
      <div class="uapopup">
        <div class="head">{{ $t("Penarikan") }}</div>
        <div class="querybox">
          <div class="q1ceb" v-show="wdType !== ''">
            <div class="cp1">
              {{ $t("JumlahPenarikan") }}（<van-icon name="gem-o" />）
            </div>
            <div class="cp2">{{ value }}</div>

            <div class="cp3">
              ≈{{ calculateAmount().amount }}
              {{ wdType == "usdt" ? "USDT" : "IDR" }}
            </div>
          </div>
          <div class="q-p1tit">{{ $t("PilihMetodePenarikan") }}</div>
          <div
            @click="typeChange('bank')"
            :class="['q-selectitem', { active: wdType == 'bank' }]"
          >
            <div class="txt">{{ $t("Kartu bank") }}</div>
            <div class="select-box"></div>
          </div>
          <div
            v-if="wdType != 'usdt'"
            @click="typeChange('usdt')"
            :class="['q-selectitem', { active: wdType == 'usdt' }]"
            style="margin-bottom: 10px"
          >
            <div class="txt">{{ $t("USDT") }}</div>
            <div class="select-box"></div>
          </div>

          <div
            v-if="wdType == 'usdt'"
            @click="typeChange('usdt')"
            :class="['q-selectitem', { active: wdType == 'usdt' }]"
            style="margin-bottom: 10px"
          >
            <div class="txt">{{ $t("USDT") }}</div>
            <div class="el-cb">
              <van-dropdown-menu placeholder="Choose">
                <van-dropdown-item v-model="usdtType" :options="dropItems" />
              </van-dropdown-menu>
              <div class="select-box"></div>
            </div>
          </div>

          <!-- <template v-if="wdType=='usdt'">
            <div @click="usdtType='TRC20'" :class="['q-selectitem q-selectitem2' ,{active2:usdtType=='TRC20'}]">
              <div class="txt">USDT TRC20</div>
            </div>
            <div @click="usdtType='ERC20'" :class="['q-selectitem q-selectitem2' ,{active2:usdtType=='ERC20'}]"
              style="margin-bottom: 30px;">
              <div class="txt">USDT ERC20</div>
            </div>
          </template> -->

          <div class="cardinfo" v-show="wdType == 'bank'">
            <!-- <div class="inputbox">
              <input
                type="text"
                v-model="usdt_protocol"
                placeholder="Please enter USDT link"
                @input="protocolChange"
              />
              <div class="close" @click="del"></div>
            </div> -->
            <div class="inputbox">
              <input
                type="text"
                v-model="bank_name"
                :placeholder="$t('EnterBankName')"
              />
            </div>
            <div class="inputbox">
              <input
                type="text"
                v-model="card_nubmer"
                :placeholder="$t('EnterBankCardNumber')"
              />
            </div>
            <div class="inputbox">
              <input
                type="text"
                v-model="card_holder"
                :placeholder="$t('MasukkanNamaPemegangKartu')"
                :disabled="is_kyc == 1"
              />
            </div>
            <!-- :disabled="card_holder != '' && is_kyc == 1" -->
            <div class="inputbox">
              <input
                type="text"
                v-model="id_number"
                :placeholder="$t('MasukkanNomorIDPemegangKartu')"
                :disabled="is_kyc == 1"
              />
            </div>
            <!-- :disabled="id_number != '' && is_kyc == 1" -->
            <div class="tipss">
              <div v-for="(item, index) in bankTips" :key="index">
                {{ index + 1 }}. {{ item }}
              </div>
            </div>
          </div>

          <div class="cardinfo" v-show="wdType == 'usdt'">
            <div class="cardinfo-head">
              <div class="cardinfo-head-l">{{ $t("USDT") }}</div>
              <!-- <div class="cardinfo-head-r">{{value}}usdt≈{{ calculateAmount().amount }} USDT</div> -->
              <!-- <div class="cardinfo-head-r">1usd≈{{ this.usdtPrice }}USDT</div> -->
            </div>
            <!-- <div class="inputbox">
              <input
                type="text"
                v-model="usdt_protocol"
                placeholder="Please enter USDT link"
                @input="protocolChange"
              />
              <div class="close" @click="del"></div>
            </div> -->
            <div class="inputbox">
              <input
                type="text"
                v-model="usdt_address"
                :placeholder="$t('addressPlaceholder')"
                @input="protocolChange"
              />
              <div class="close" @click="addresdel"></div>
            </div>
            <div class="tipss">
              <div v-for="(item, index) in usdtTips" :key="index">
                {{ index + 1 }}. {{ item }}
              </div>
            </div>
          </div>

          <div
            :class="['query-submit-btn', { submitDisabled: submitDisabled }]"
            @click="sub"
          >
            {{ $t("Kirim") }}
          </div>
        </div>
      </div>
    </van-popup>
    <!--  审核状态-->
    <van-popup v-model="statusShow" round>
      <div class="querybox-c" v-if="status != 0">
        <div class="qb-tit">
          {{ $t("withDrawalTip") }}
        </div>
        <div class="btnlist">
          <div class="btn cancel" @click="statusShow = false">
            {{ $t("Cancel") }}
          </div>
          <div
            class="btn authentication"
            @click="$router.push('/authentication')"
          >
            {{ $t("Authentication") }}
          </div>
        </div>
      </div>
      <div class="querybox-c" v-else>
        <div class="qb-tit">
          {{ $t("AuthenticationTip") }}
        </div>
        <div class="ok-btn" @click="statusShow = false">{{ $t("ok") }}</div>
      </div>
    </van-popup>
  </div>
</template>
<script>
// import InputNumber from "./components/InputNumber.vue";
import {
  httpWithdrawSubmit,
  httpInfo,
  httpWithdrawalWay,
  httpWithdrawalTips,
  httpExchangeTips,
  httpGetBindBank,
} from "@/http/api";

import { formatMoney } from "@/utils/common";
export default {
  name: "withdrawal",
  // components: { InputNumber },
  data() {
    return {
      bank_name: "",
      card_nubmer: "",
      card_holder: "",
      id_number: "",
      value: "0.00",
      isWithdrawa: true, // 是否满足提现条件
      rulesShow: false,
      wqueryShow: false,
      wdType: "", // 提现方式
      usdt_protocol: "", // 协议
      usdt_address: "", // 地址
      subAjax: false,
      amount: "",
      usdtType: "TRC20",
      assets_total: 0, // 总资产
      assets_available: 0, //可用资产
      assets_freeze: 0, //冻结资产
      win_lose_amount: 0, //输赢额度资产
      submitDisabled: true,
      minimum: 10, // 最小提现额度
      usdtPrice: 1, // usdt价格
      status: -1, //-1:未审核 0:审核中,1:审核成功,2:审核失败
      statusShow: false,
      dropItems: [],
      usdtTips: "",
      bankTips: "",
      tip: "",
      way: { bank: 0, usdt: 0 },
      withdrawalTips: "",
      exchangeTips: "",
      keripikShow: false,
      keyShow: false,
      tipshow: false,
      is_kyc: 0,
    };
  },
  created() {
    // this.getMarketsUSDT();
    this.getHttpInfo();
    //this.getHttpIsCertification();
    this.getHttpWithdrawalWay();
    this.getHttpWithdrawalTips();
    this.getHttpGetBindBank();
    // this.getHttpExchangeTips();
  },
  methods: {
    // keripikShow
    formatMoney,
    // 钻石
    async getHttpWithdrawalTips() {
      const res = await httpWithdrawalTips();

      if (res.code == 0) {
        console.log(res.data?.tip);
        this.withdrawalTips = res.data?.tip;
        // console.log('---',this.withdrawalTips)
        if (this.withdrawalTips != undefined) {
          this.tipshow = true;
        }
      }
    },
    // 兑换
    async getHttpExchangeTips() {
      const res = await httpExchangeTips();
      if (res.code === 0) {
        this.getHttpWithdrawalTips();
        // this.exchangeTips = res.data?.message;
      }
    },

    async getHttpWithdrawalWay() {
      const res = await httpWithdrawalWay();
      console.log(res.data);
      this.way["bank"] = res.data["Bank"]["currency_rate"];
      this.way["usdt"] = res.data["USDT"]["currency_rate"];
      res.data["USDT"].network.forEach((item) => {
        const data = {
          text: item,
          value: item,
        };
        this.dropItems.push(data);
      });
      this.usdtTips = res.data["USDT"].tip;
      this.bankTips = res.data["Bank"].tip;
    },

    // 获取获取绑定银行卡信息
    async getHttpGetBindBank() {
      let res = await httpGetBindBank({});
      if (res.code == 0) {
        const arr = res.data.data;
        this.is_kyc = res.data.is_kyc;
        if (arr.length) {
          const obj = arr[0];
          (this.bank_name = obj.bank_name),
            (this.card_nubmer = obj.bank_no),
            (this.card_holder = obj.bank_user_name),
            (this.id_number = obj.id_number);
        }
        // this.status = "status" in res.data ? res.data.status : -1;
      }
    },
    // 获取认证信息
    // async getHttpIsCertification() {
    //   let res = await httpIsCertification();
    //   if (res.code == 0) {
    //     this.status = "status" in res.data ? res.data.status : -1;
    //   }
    // },
    //获取价格
    // async getMarketsUSDT() {
    //   let res = await http.getMarketsUSDT();
    //   console.log(res);
    //   if (res.success) {
    //     this.usdtPrice = res.result.price;
    //   }
    //   // let res = await httpWithdrawInfo();
    //   // if (res.code == 0) {
    //   //   this.amount = res.data.amount || ''
    //   // }
    // },
    async getHttpInfo() {
      let res = await httpInfo();
      if (res.code == 0) {
        this.assets_total = res.data?.diamond || 0;
        this.assets_available = res.data?.diamond || 0;
        this.assets_freeze = res.data?.diamond || 0;
        this.win_lose_amount = res.data?.win_lose_amount || 0;
      }
    },
    keripik() {
      // this.getHttpExchangeTips();
      this.$dialog
        .confirm({
          message: this.withdrawalTips,
          confirmButtonText: "Ok",
          cancelButtonText: "Cancel",
        })
        .then(() => {
          console.log("cehnggong");
          this.getHttpExchangeTips();
          this.getHttpInfo();
        })
        .catch(() => {
          console.log("shibai");
        });
    },
    update(value) {
      if (value == -1) {
        if (this.value == "0.00") {
          this.value = "";
          //this.$refs.InputNumber.disabled = true;
        } else {
          this.value = this.value.substring(0, this.value.length - 1);
          // if (!this.value) this.$refs.InputNumber.disabled = false;
          // else this.$refs.InputNumber.disabled = true;
        }
      } else {
        if (this.value == "0.00") {
          this.value = "";
          //this.$refs.InputNumber.disabled = true;
        }
        if (!this.value && value == ".") return;
        this.value += value;
        this.value = this.value.toString().match(/^\d+(?:\.\d{0,2})?/)[0];

        // this.$refs.InputNumber.disabled = false;
      }
      if (Number(this.value) > Number(this.assets_available)) {
        this.isWithdrawa = false;
        //this.$refs.InputNumber.disabled = true;
      } else {
        this.isWithdrawa = true;
        // this.$refs.InputNumber.disabled = false;
      }
    },
    // 确认 1
    query() {
      // if (this.status == -1 || this.status == 2 || this.status == 0) {
      //   this.statusShow = true;
      //   return;
      // }

      if (!Number(this.value)) return;
      // return this.$toast('Please enter the amount');
      // if (Number(this.value) < this.minimum) return this.$toast("The minimum withdrawal limit is 10");
      if (Number(this.value) > Number(this.assets_available)) {
        return this.$toast("Exceeding the maximum withdrawal limit");
      }
      // if (Number(this.value) > Number(this.assets_available)) return
      //console.log(Number(this.value),Number(this.assets_available))
      this.isWithdrawa = true;
      this.wqueryShow = true;
    },
    typeChange(wdType) {
      this.wdType = wdType;
      this.protocolChange();
    },

    protocolChange() {
      if (this.wdType == "usdt" && this.usdt_address.trim()) {
        this.submitDisabled = false;
      } else if (this.wdType == "bank") {
        this.submitDisabled = false;
      } else {
        this.submitDisabled = true;
      }
    },
    //usdt协议清除
    del() {
      this.usdt_protocol = "";
      this.protocolChange();
    },
    //usdt地址清除
    addresdel() {
      this.usdt_address = "";
      this.protocolChange();
    },
    //计算数值
    calculateAmount() {
      const obj = {
        reduce_win_lose_amount: 0,
        amount: 0,
      };

      let price = Number(this.value);
      let win_lose_amount = Number(this.win_lose_amount);
      obj.reduce_win_lose_amount = win_lose_amount;
      // if(this.wdType)
      console.log(this.wdType);
      console.log(this.way);
      if (this.wdType == "usdt") {
        obj.amount = price * this.way["usdt"];
      }
      if (this.wdType == "bank") {
        obj.amount = price * this.way["bank"];
      }
      // obj.amount = price
      // // 低费率
      // if (price <= win_lose_amount) {
      //   // obj.reduce_win_lose_amount = price;
      //   obj.amount = price - price * 0.3;
      // }
      // // 高费率
      // if (price > win_lose_amount) {
      //   // obj.reduce_win_lose_amount = win_lose_amount;
      //   obj.amount = win_lose_amount * 0.3 + (price - win_lose_amount) * 0.5;
      // }

      return obj;
    },

    async sub() {
      if (this.subAjax) return;

      if (Number(this.value) > this.assets_available)
        return this.$toast("Insufficient Balance");
      if (
        !this.usdt_address &&
        !this.bank_name &&
        !this.card_nubmer &&
        !this.card_holder &&
        !this.id_number
      ) {
        if (this.wdType === "bank") {
          return this.$toast("Please enter bank card information");
        } else {
          return this.$toast("Please enter usdt_address");
        }
      }
      // if (this.wdType == "usdt" && !this.usdt_protocol)
      //   return this.$toast("Please enter usdt_protocol");

      let params;
      if (this.wdType === "bank") {
        params = {
          way: this.wdType,
          bank_no: this.card_nubmer,
          bank_name: this.bank_name,
          bank_user_name: this.card_holder,
          id_number: this.id_number,
          //amount: this.calculateAmount().amount,
          amount: Number(this.value),
        };
      } else {
        params = {
          way: this.wdType,
          usdt_network: this.usdtType,
          usdt_address: this.usdt_address,
          amount: Number(this.value),
          //amount: this.calculateAmount().amount,
        };
      }

      console.log(httpWithdrawSubmit, params);
      this.subAjax = true;
      let res = await httpWithdrawSubmit(params);

      if (res.code == 0) {
        this.$dialog({
          title: "Submitted successfully",
          message: "The review time is 1-3 working days, please be patient",
          confirmButtonText: "OK",
          confirmButtonColor: "#239FFF",
        }).then(() => {
          this.wqueryShow = false;
        });
      } else {
        this.$toast(res.message);
      }
      this.subAjax = false;
    },
  },
};
</script>
<style lang="less" scoped>
@import url("./acc.less");
@import url("./newFont.less");

* {
  // color: ;*{
  color: #93653e;
  font-weight: 400;
}

.headcard {
  height: 450px !important;
}

.tips-box {
  // width: 90.933vw;
  // height: 44.8vw;
  // background: linear-gradient(160.15deg, #e1e5ff 0%, #bbc5f3 100%);
  // position: absolute;
  // left: 50%;
  // bottom: -10.667vw;
  // transform: translateX(-50%);
  // border-radius: 3.467vw;
  // padding: 5.333vw 4.267vw 0;
  width: 682px;
  height: 15vw;
  // background: linear-gradient(160.15deg, #e1e5ff 0%, #bbc5f3 100%);
  background-color: #e5c184;
  position: absolute;
  border-radius: 3.467vw;
  left: 50%;
  transform: translateX(-50%);
  padding: 5.333vw 4.267vw 0;
  // left: 50%;
  margin: 2.8vw auto;
  display: flex;
  justify-content: space-between;
  align-items: center;

  .text {
    font-size: 3vw;
    letter-spacing: 3px;
    flex: 1;
    padding: 1px 5px;
    font-weight: bold;
  }

  .btn {
    padding: 20px;
    // background-color: aquamarine;
    background: linear-gradient(178.44deg, #eedcc9 0%, #dcbc9b 100%);
    // background-color: #93653E;
    height: 70px;
    // color: #fff;
    border-radius: 20px;
  }
}

.hbox-fee-tips {
  position: absolute;
  top: 90px;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0px;
  // color: #f2f4ff;
}

.input-icon img {
  width: 120px;
  height: 120px;
}
.input-currency {
  width: 150px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
}
.input-btn {
  width: 150px;
  height: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #93653e;
  color: #fff;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0px;
  border-radius: 0.3rem;
  // color: rgba(112, 126, 162, 1);
}

.hbox-tips {
  display: flex;
  align-items: center;
}

.hbox-tips img {
  width: 40px;
  height: 40px;
  margin: 0 10px;
}

.hbox-tips-error {
  font-size: 20px;
  // color: red;
  position: relative;
  top: -16px;
}

.uapopup {
  .head {
    height: 112px;
    width: 100%;
    font-size: 30px;
    font-weight: 700;
    // color: rgba(112, 126, 162, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(241, 241, 241, 1);
  }

  .rulebox {
    width: 682px;
    margin: 32px auto;
    height: 1048px;
    background: rgba(249, 249, 249, 1);
    padding: 32px;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0px;
    // color: rgba(132, 144, 177, 1);
    line-height: 1.3;
  }

  .querybox {
    width: 100%;
    padding: 32px;
    max-height: 75vh;
    overflow-y: auto;

    .q1ceb {
      width: 682px;
      height: 256px;
      background: rgba(246, 247, 252, 1);
      border-radius: 30px;
      padding-top: 60px;
      text-align: center;
      margin-bottom: 60px;

      .cp1 {
        font-size: 20px;
        font-weight: 400;
        letter-spacing: 0px;
        // color: rgba(171, 182, 212, 1);
        margin-bottom: 34px;
      }

      .cp2 {
        font-size: 40px;
        font-weight: 700;
        letter-spacing: 0px;
        // color: rgba(112, 126, 162, 1);
        margin-bottom: 24px;
      }

      .cp3 {
        font-size: 30px;
        font-weight: 400;
        letter-spacing: 0px;
        // color: rgba(112, 126, 162, 1);
      }
    }

    .q-p1tit {
      font-size: 30px;
      font-weight: 700;
      letter-spacing: 0px;
      // color: rgba(132, 144, 177, 1);
      margin-bottom: 36px;
    }

    .q-selectitem {
      width: 682px;
      height: 101px;
      opacity: 1;
      background: rgba(255, 255, 255, 1);
      box-shadow: 0px 0 10px 0px rgba(212, 212, 212, 0.43);
      border-radius: 20px;
      margin-bottom: 32px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 32px;

      .txt {
        font-size: 28px;
        font-weight: 400;
        letter-spacing: 0px;
        // color: rgba(132, 144, 177, 1);
      }

      .el-cb {
        display: flex;
        height: 100%;
        align-items: center;
        width: 200px;
      }

      .select-box {
        width: 48px;
        height: 48px;
        background: rgba(243, 243, 243, 1);
        border: 2px solid rgba(235, 235, 235, 1);
        position: relative;
        border-radius: 50%;
        flex-shrink: 0;
      }

      &.active {
        .select-box {
          border: 2px solid rgba(238, 220, 201, 1);

          &::before {
            content: "";
            display: block;
            width: 20px;
            height: 20px;
            background: rgba(222, 191, 160, 1);
            border-radius: 50%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
          }
        }
      }

      &.q-selectitem2 {
        width: 648px;
        margin: 10px auto;
        height: 80px;
      }

      &.active2 {
        background: #eedcc9;

        .txt {
          // color: #fff;
        }
      }
    }

    .cardinfo {
      width: 100%;
      padding: 32px;
      border-radius: 20px;
      box-shadow: 0px 3px 6px 0px rgba(212, 212, 212, 0.43);
      margin-bottom: 100px;

      .cardinfo-head {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 60px;

        .cardinfo-head-l {
          font-size: 28px;
          font-weight: 700;
          letter-spacing: 0px;
          // color: rgba(132, 144, 177, 1);
        }

        .cardinfo-head-r {
          font-size: 24px;
          font-weight: 400;
          letter-spacing: 0px;
          // color: rgba(171, 182, 212, 1);
        }
      }

      .inputbox {
        height: 93px;
        width: 100%;
        background: rgba(246, 247, 252, 1);
        border-radius: 20px;
        display: flex;
        align-items: center;
        padding: 0 32px;
        justify-content: space-between;
        margin-bottom: 24px;

        input {
          flex: 1;
          height: 100%;
          background: transparent;
          outline: none;
          font-size: 28px;
          font-weight: 400;
          letter-spacing: 0px;
          // color: rgba(132, 144, 177, 1);
          border: none;

          &::-webkit-input-placeholder {
            font-size: 28px;
            font-weight: 400;
            letter-spacing: 0px;
            // color: rgba(193, 194, 211, 1);
          }
        }

        .close {
          width: 48px;
          height: 48px;
          background: url("~@/assets/img/close.png") center/48px 48px;
          user-select: none;
          flex-shrink: 0;
        }
      }

      .tipss {
        padding: 32px;
        width: 100%;
        background: rgba(248, 248, 248, 1);
        font-size: 24px;
        font-weight: 400;
        line-height: 1.5;
        // color: rgba(171, 182, 212, 1);
        border-radius: 20px;
      }
    }

    .query-submit-btn {
      width: 682px;
      height: 93px;
      opacity: 1;
      background: linear-gradient(
        178.44deg,
        rgba(238, 220, 201, 1) 0%,
        rgba(220, 188, 155, 1) 100%
      );
      box-shadow: 1px 7px 8px 0px rgba(201, 173, 144, 0.51);
      margin: auto;
      border-radius: 20px;
      user-select: none;
      font-size: 28px;
      font-weight: 400;
      letter-spacing: 0px;
      // color: rgba(255, 255, 255, 1);
      display: flex;
      align-items: center;
      justify-content: center;

      &.submitDisabled {
        box-shadow: 1px 7px 8px 0px rgba(201, 173, 144, 0);
        background: #ccc;
      }
    }
  }
}

.querybox-c {
  width: 682px;
  padding: 32px;
  background: rgba(255, 255, 255, 1);
  border-radius: 20px;

  .qb-tit {
    width: 100%;
    text-align: center;
    padding: 24px 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0px;
    // color: rgba(112, 126, 162, 1);
    border-bottom: 1px solid rgba(241, 241, 241, 1);

    margin-bottom: 12px;
  }

  .ok-btn {
    width: 100%;
    height: 77px;
    display: flex;

    background: linear-gradient(
      178.44deg,
      rgba(238, 220, 201, 1) 0%,
      rgba(220, 188, 155, 1) 100%
    );
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0px;
    box-shadow: 1px 7px 8px 0px rgba(201, 173, 144, 0.51);
    // color: #fff;
    align-items: center;
    justify-content: center;
    user-select: none;
    border-radius: 20px;
  }

  .btnlist {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;

    .btn {
      font-size: 28px;
      font-weight: 400;
      letter-spacing: 0px;
      // color: rgba(171, 182, 212, 1);
      // background: linear-gradient(178.44deg, #eedcc9 0%, #dcbc9b 100%);
      width: 265px;
      height: 77px;
      display: flex;
      align-items: center;
      justify-content: center;
      user-select: none;
      border-radius: 20px;

      &.cancel {
        background: rgba(242, 243, 246, 1);
        border: 1px solid rgba(223, 228, 241, 1);
      }

      &.authentication {
        background: linear-gradient(
          178.44deg,
          rgba(238, 220, 201, 1) 0%,
          rgba(220, 188, 155, 1) 100%
        );
        box-shadow: 1px 7px 8px 0px rgba(201, 173, 144, 0.51);
        // color: #fff;
      }
    }
  }
}

::v-deep .van-dropdown-menu {
  width: 100%;

  .van-dropdown-menu__bar {
    background: transparent;
    box-shadow: none;

    .van-dropdown-menu__item {
      justify-content: flex-start;
    }

    .van-ellipsis {
      letter-spacing: 0px;
      color: #8490b1;
      font-size: 28px;
    }

    .van-dropdown-menu__title {
      color: #c5c5c5;
      font-size: 30px;
      padding: 0;
      width: 100%;
      display: block;

      &::after {
        right: 24px;
      }
    }
  }

  .van-dropdown-item__option--active {
    color: #e6cdb4;

    .van-dropdown-item__icon {
      color: #e6cdb4;
    }
  }
}
</style>
